<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta name="description" content="">
    <meta http-equiv="x-dns-prefetch-control" content="on">

    <title>嘉定计量质量检测公共服务平台</title>
    <link href="css/css.css" rel="stylesheet" type="text/css"><!--全局-->
    <link href="css/jiliang.css" rel="stylesheet" type="text/css"><!--指定-->
    <script  src="common/js/jquery-easyui-1.2.5/jquery-1.7.1.min.js">  //引入jq
	</script> 
	<script type="text/javascript" src="common/js/json2.js"></script>
	<script type="text/javascript" src="common/js/jquery.min.js"></script>
	<script  src="common/js/init.js"> </script> 
	<script  src="common/js/basefast.js" > </script> 
      <script type="text/javascript"> 
  	$(document).ready( function(){
  		var id = getQueryString("id");
  		if(id==null||id=="")
  		{
  			alert("您还未登录!请登录!");
  			window.location="index.html";
  		} 
  		var token = getQueryString("token");  
  		function getQueryString(name) {//取URL参数  要得到id 就传id
		    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
		    var r = window.location.search.substr(1).match(reg);
		    if (r != null) return unescape(r[2]); return null;
		    } 
							var info = {};
										info.sForm = { "id" : id };
										Communicator.send("LoginService", "listdetail", info, {
													onSuccess : function(data) {
														//alert(data.go[0].UNIT_NAME);
														$("#name").text(data.go[0].UNIT_NAME);
														$("#address").text(data.go[0].ADDRESS);
														$("#phone").text(data.go[0].TEL);
														$("#linkman").text(data.go[0].LINKMAN);
														$("#fax").text(data.go[0].FAX_NUMBER);
														$("#postcode").text(data.go[0].POSTCODE);
														$("#simpleaddress").text(data.go[0].SAMPLE_ADDRESS);
														
														if(data.go!=null)
														{
															$.each(data.go, function(i,item){  
														 		$("#go").after(" <div class='twoitem ml15 mr15' style='overflow: hidden;'> <span class='font16 mb10'>器具名称:<font class='ml5'>"+item.WARE_NAME+"</font></span>"
														        		+		" <div class='left w33' style='overflow: hidden;'>"
														        		+	  "<span class='itemconname'>件数:<font class='ml5'>"+item.NUMBER+"</font></span>"
														        		+		"  </div>"
														        		+		  " <div class='left w33' style='overflow: hidden;'>"
														        		+	     "<span class='itemconname'>修理:<font class='ml5'>"+item.REPAIR_NUMBER+"</font></span>"
														        		+	 "</div>"
														        		+	 " <div class='left w33' style='overflow: hidden;'>"
														        		+	  "<span class='itemconname'>服务类型:<font class='ml5'>"+item.SERVICE_TYPE+"</font></span>"
														        		+	 "</div>"
														        		+	 "</div>");   
																	});
														}
														else
														{ 
															$("#go_msg").css('display','block'); 
															$("#go_msg").text("无带回计量器具信息");
														}
														 
														if(data.back!=null)
														{
															$.each(data.back, function(i,item){  
														 		$("#back").after(" <div class='twoitem ml15 mr15' style='overflow: hidden;'> <span class='font16 mb10'>器具名称:<font class='ml5'>"+item.WARE_NAME+"</font></span>"
														        		+		" <div class='left w33' style='overflow: hidden;'>"
														        		+	  "<span class='itemconname'>件数:<font class='ml5'>"+item.NUMBER+"</font></span>"
														        		+		"  </div>"
														        		+		  " <div class='left w33' style='overflow: hidden;'>"
														        		+	     "<span class='itemconname'>修理:<font class='ml5'>"+item.REPAIR+"</font></span>"
														        		+	 "</div>"
														        		+	 " <div class='left w33' style='overflow: hidden;'>"
														        		+	  "<span class='itemconname'>服务类型:<font class='ml5'>"+item.SERVICE_TYPE+"</font></span>"
														        		+	 "</div>"
														        		+	 "</div>");   
																	});
														}
														else
														{
													 
															$("#back_msg").css('display','block'); 
															$("#back_msg").text("无带回计量器具信息");
														}
														
													}, onFail : function(xmlR, status, e) { }
												});
					
								$("#sub").click(function(){
									window.location="check.html?id="+id+"&token="+token;
								});
								
										
					});
						</script> 
</head>
<body>
<section class="infogroup">
    <div class="group-title">单位信息</div>
    <div class="twoitem ml15 mr15" style="overflow: hidden;">
        <div class="left oneitemcon">
            <span class="itemconname" >单位名称:</span>
            <span class="itemconsubtitle mt3" id="name" > </span>
        </div>
        <div class="right oneitemcon">
            <span class="itemconname">联系地址:</span>
            <span class="itemconsubtitle mt3" id="address"> </span>
        </div>
    </div>
    <div class="twoitem ml15 mr15" style="overflow: hidden;">
        <div class="left oneitemcon">
            <span class="itemconname">联系电话:</span>
            <span class="itemconsubtitle mt3" id="phone"> </span>
        </div>
        <div class="right oneitemcon">
            <span class="itemconname">联系人:</span>
            <span class="itemconsubtitle mt3" id="linkman"> </span>
        </div>
    </div>
    <div class="twoitem ml15 mr15" style="overflow: hidden;">
        <div class="left oneitemcon">
            <span class="itemconname">传真号:</span>
            <span class="itemconsubtitle mt3" id="fax"> </span>
        </div>
        <div class="right oneitemcon">
            <span class="itemconname">邮编:</span>
            <span class="itemconsubtitle mt3" id="postcode"> </span>
        </div>
    </div>
</section>
<section class="infogroup mt15" >
    <div class="group-title" id="go">上门检测计量</div>
      <label style="display: none;" id="go_msg"></label>
</section>

<section class="infogroup mt15">
    <div class="group-title" id="back">本次带回计量器具</div>
     <label style="display: none;" id="back_msg"></label>
</section>

<section class="infogroup mt15">
    <div class="group-title">取样(报告)地点</div>
    <div class="oneitem ml15 mr15" style="overflow: hidden;"> 
        <label  id="simpleaddress">
         
        </label>
    </div>
     
</section>
<section class="p15 p15r mt10">
    <button class="btn bottomonebtn" id="sub">生成最终订单</button> 
</section>
</body>
</html>